#ifndef REFEREE_USART_TASK_H
#define REFEREE_USART_TASK_H

#include "main.h"
#include "fifo.h"
#include "protocol.h"
#include "referee.h"

#define USART_RX_BUF_LENGHT     512
#define REFEREE_FIFO_BUF_LENGTH 1024

typedef struct
{
    uint8_t usart6_buf[2][USART_RX_BUF_LENGHT];

    fifo_s_t referee_fifo;
    uint8_t referee_fifo_buf[REFEREE_FIFO_BUF_LENGTH];
    unpack_data_t referee_unpack_obj;
} referee_usart_t;

extern referee_usart_t referee_usart;

extern void referee_usart_task(void const * argument);

#endif
